package com.ruoyi.article.mapper;

import com.ruoyi.article.domain.Article;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * asdMapper接口
 * 
 * @author ruoyi
 * @date 2025-06-19
 */
public interface ArticleMapper 
{



    List<Article> listArticles(@Param("title")String title );


    @Select("select * from article where id=#{id}")
    Article selectArticleById(String id);

    int insertArticle(@Param("article") Article article, @Param("loid") Long loid);


    @Delete("delete  from article where id=#{id}")

    int deleteArticleByIds(@Param("id") String id);


    @Update("update article set is_sublish=#{isSublish} where id=#{id}")
    int updateArticleStatus( @Param("id") Long id, @Param("isSublish") int isSublish);

    int updateArticle(Article article);
}
